package br.sales.controller;

import java.util.List;

import br.sales.entity.Newsletter;
import br.sales.entity.exception.EntityExistsException;
import br.sales.entity.exception.EntityNotExistsException;
import br.sales.persistence.IPersistence;
import br.sales.persistence.exception.DBContainerNotInitializedException;

public interface INewsletterControler {

	Newsletter create(Newsletter newsletter)  throws DBContainerNotInitializedException, EntityExistsException;;
	Newsletter update(Newsletter newsletter) throws DBContainerNotInitializedException, EntityExistsException, Exception;
	void delete(Newsletter newsletter) throws DBContainerNotInitializedException, EntityNotExistsException;
	void delete(Newsletter newsletter, IPersistence persistence)  throws DBContainerNotInitializedException, EntityExistsException;
	Newsletter create(Newsletter newsletter, IPersistence persistence)  throws DBContainerNotInitializedException;
	Newsletter update(Newsletter newsletter, IPersistence persistence) throws DBContainerNotInitializedException, EntityExistsException;
	List<Newsletter> listAll() throws DBContainerNotInitializedException;
	List<Newsletter> listLike(String like) throws DBContainerNotInitializedException;
	Newsletter retrieve(String email) throws DBContainerNotInitializedException;
	Newsletter retrieve(String email, IPersistence persistence) throws DBContainerNotInitializedException;
}
